package com.iraeta.dao.main;

import com.iraeta.entity.main.DJFile;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface DJFileDao {

    int insert(DJFile djFile);

    int updateByPrimaryKey(DJFile djFile);

    DJFile selectByPrimaryKey(Integer id);

    int deleteByPrimaryKey(Integer id);

    @Select("select * from dj_file where fileName = #{fileName} order by djFileTime desc limit 1")
    DJFile selectByFileName(@Param("fileName") String fileName);

    @Select("select * from dj_file where statusId = #{statusId}")
    List<DJFile> selectByStatusId(@Param("statusId") Integer statusId);
}
